// This File is part of Innovation Foundry's "QualityHelper Project"
//
// Copyright  2008 Innovation Foundry Pty Ltd
// All rights reserved

// This work is free software; you can redistribute it and/or modify 
// it under the terms of the GNU General Public License as published 
// by the Free Software Foundation; either version 3 of the License, 
// or any later version. This work is distributed in the hope that 
// it will be useful, but WITHOUT ANY WARRANTY; without even the 
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
// PURPOSE. 
// See version 3 of the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this work; if not, write to the
// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA  02110-1301 USA
// or alternatively it may be downloaded from <http://www.gnu.org/licenses/>.
function trace(message) { }
function setError(s) { }

var wp = google.gears.workerPool;
wp.onmessage = function(a, b, message) {
    //message.body[0] + message.body[1] + "... " + message.body[2].helloWorld
    var reply = "test_search_capability";
    wp.sendMessage(reply, message.sender);
}

function include(url, callback) {
    var req = google.gears.factory.create("beta.httprequest", "1.0");
    req.onreadystatechange = function() {
        if (req.readyState == 4) {
            include.callback = callback;
            // Hack to workaround the fact that global.eval() doesn't work in IE.
            google.gears.factory.create("beta.timer", "1.0").setTimeout(req.responseText + "\ninclude.callback()", 0);
        }
    }
    req.open("GET", url);
    req.send(null);
}

include("qualityhelper_classes.js", function() {
    include("data_manager.js", function() {
        // Use libs here
        //do search
    });
});



